package com.west_traveler.find_page_fragment.cate_fragment;


import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.west_traveler.entity.entity_category.entity_category_second.Entity_Cate_Fra;
import com.west_traveler.ximalayafm.R;


public class Cate_RecomFragment extends Fragment {

    private Entity_Cate_Fra data;


    public static Cate_RecomFragment getInstance() {
        return new Cate_RecomFragment();
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_cate__recom,container,false);
        return view;
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        Bundle arguments = getArguments();
        data = arguments.getParcelable("data");
        RecyclerView recycler = (RecyclerView) view.findViewById(R.id.recycler_frg_cate_recom);
        RecyclerAdapter_Cate_Recom adapter = new RecyclerAdapter_Cate_Recom(getContext(), data);
        recycler.setAdapter(adapter);
    }
}
